This invention relates to an information processing apparatus and method. More particularly, the invention relates to an interface between a searcher and a multidatabase system, a system for integrating databases of different types and an ordinary database system, as well as a method of searching these databases.
The spread of computer networks has made possible to access a variety of databases from personal terminals. Databases accessible from a network are managed by management systems described in various languages. In order to access data from various databases, it is necessary that the user know the query formats of all of the relevant management systems. This places a large burden upon a user who is not accustomed to dealing with the databases. If it were possible to unify or integrate the data of different formats and meanings stored in these various databases, the utility value of the databases connected to the network would be greater.
To lighten the burden on the user, several techniques for integrating different databases have been proposed. For example, techniques through which computer systems constructed using different languages and environments are accessed by a user without the user needing to be aware of these languages and environments have been proposed and are referred to as multimedia databases and distributed computer systems, etc. The object of these techniques is to allow the user to search a plurality of databases described in different languages or storing the same data under different attribute names without requiring that the user be aware of these differences. Techniques necessary to attain this object can be classified roughly as techniques for (1) translation between database languages and (2) association of table names with attribute names.
A multidatabase system based upon a translation between database languages is implemented in a manner described below using the art described in the specification of Japanese Patent Application Laid-Open (KOKAI) No. 7-65032. In the description that follows, the query language that can be employed at a user terminal shall be referred to as xe2x80x9cstandard languagexe2x80x9d, and the format for expressing the data shall be referred to as a xe2x80x9cstandard formatxe2x80x9d. A multidatabase system is provided with the following libraries and table in advance:
(1) A language translation library for making a translation between the standard language used by a user terminal and a database language used by the database that is to be searched.
(2) A data conversion library for converting data expressed by the standard format to data having a format specific to each database, or vice versa.
(3) A management table for associating a database name with the corresponding language translation library and data conversion library.
According to the art described above, the user describes the name of the database to be searched and the query using the standard language. In response, the system obtains the number of the language translation library and the number of the data conversion library corresponding to the target database from the target database name using the management table. The system then converts the query described by the user using the standard language to the language employed by the target database using the language translation library and transmits the query in this language to the target database. When the result of the query is transmitted from the target database, the system converts the result to the standard language using the data conversion library and then transmits the result to the user in the standard language.
Another method of implementation is command transfer in a network system by a technique described in the specification of Japanese Patent Application Laid-Open (KOKAI) No. 5-342123. According to this system, a command sequence entered by the user is analyzed, a system in a computer network for executing the requested processing is decided and the command specified by the user is converted to a command that is supported by the system. Such a system can be applied to a multidatabase system if the command is considered to be a query statement and the searched system is considered to be a database management system.
The methods according to the prior art involve certain problems. First, with the system of Japanese Patent Application Laid-Open No. 7-65032, the name of the database to be searched must be specified. The method of Japanese Patent Application Laid-Open No. 5-342123 is such that in order to decide the system that is to execute processing on the basis of parameters set by the user, a file name, table name and attribute name serving as the parameters must be specified correctly.
In a case where a script described by the user is evaluated in the applicative order in accordance with the conventional methods, even procedures and data that play no part whatsoever in obtaining the final results requested by the user are evaluated (executed).
In the case of an ordinary program, the advantages of a compact interpreter outweigh the increase in amount of computation due to the execution of unnecessary evaluations. Evaluation in the applicative order, therefore, tends to be preferred. With a system in which distributed databases are integrated, however, the amount of network communication is an important evaluation item. Accordingly, using a communication channel to evaluate unnecessary procedures or data should be avoided to the maximum extent possible.
Furthermore, an optimization mechanism has been provided for commercial databases. Specifically,-in regard to a query obtained by combining partial queries, the mechanism reorders the applicative order of the queries so as to maximize processing speed. However, when an multidatabase system evaluates partial queries in the applicative order, the optimization mechanism with which each database is provided can no longer be utilized.
Accordingly, an object of the present invention is to make possible the utilization of a desired resource even if the computer having the resource is not accurately specified by the user.
Another object of the present invention is to arrange it so that if a resource that perfectly matches the content of a user input does not exist, it is possible to select and utilize a computer having a resource close to the desired resource.
Another object of the present invention is to arrange it so that when there are a plurality of computer candidates having resources, the candidate for which the cost of executing a command is smallest is utilized preferentially to make possible the efficient execution of processing.
Another object of the present invention is to make it possible to avoid the unnecessary evaluation of-procedures and data not needed to obtain the final result required by the user, thereby reducing traffic in data communication.
Another object of the present invention is to make possible a partial query to a database and to make possible the utilization of an optimization function of each database.
Another object of the present invention is to make the scheduling of primitives by an interpreter of primitives unnecessary, thereby simplifying interpreter design.
Another object of the present invention is to make it possible to select delayed evaluation based upon evaluation in the applicative order.
Another object of the present invention is to make it possible to execute the queries of a plurality of databases in parallel.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.